#version 460 core

layout (location = 0) in vec3 vPosition;
layout (location = 1) in vec2 vTexCoord;
layout (location = 2) in vec3 vNormal;

out vec2 FragTexCoord;
out vec3 FragPosition;
out vec3 FragNormal;

uniform mat4 proj;
uniform mat4 view;
uniform mat4 model;

void main() {
    FragPosition = vec3(model * vec4(vPosition, 1.0));

    gl_Position = proj * view * model * vec4(vPosition, 1.0);
    FragTexCoord = vTexCoord;
    FragNormal = mat3(transpose(inverse(model))) * vNormal;
}
